LayoutBox component (version 1.0 - 32 bit version)
===================

FREEWARE	This component works until 31/03/97.

author : Bert De Coutere       
e-mail : bert.decoutere@student.kuleuven.ac.be


Files :
-------

'layout.dcu' : you should include this file in your Delphi library. It will put
	the Tlayoutbox component on your 'samples' picklist.
'project1.exe' : example program; source code is also included 


Abilities : 
-----------

The LayoutBox component places formatted and clickable text, lines, boxes,
pictures and tables in a scrollable area, out of a source text.

The run-time property 'contents' consists of text (it is a TStringlist, to be
more exact). This text contains the format commands and other commands. The
text in contents must be filled at runtime (textlines within the program, or
input from a file, a database or a memo). The LayoutBox will only display the
text when the procedure 'DisplayContents' is called.

I hereby provide a list of the most important commands the LayoutBox can handle.
Please refer to the example program for experimenting purposes.


Commands :
----------

Input text for the 'contents' property exists out of lines. There is no automatic
word wrapping to the next line. If the text doesn't fit the box, scrollbars will
appear. Separate words are by default clickable. Wordgroups that have to be 
clickable, should be written as 'this_is_a_word_group'. The underscore sign doesn't 
display on screen, but the whole wordgroup will highlight when clicked on. Wordparts
that have to be clickable, are divided by the '|' sign. Thus, 'Del|phi' will display
as a single word, but both syllables are separately clickable.

Commands are always written between '{' and '}' signs. The most of them, but not 
all commands can be written anywhere in a line. Some commands must be written on
a single line. A command argument 'normal' refers to the situation when the
'DisplayContents' method is called.

1. 	CHANGE FONTCOLOR

    syntax : {fontcolor=XXX}
    with : XXX as 'black','maroon','green','olive','navy','purple'
                         'teal','gray','silver','red','lime','yellow'
                         'blue','fuchsia','aqua','white'
                         or 'normal'     (don't put the quote sign)
	
2. 	CHANGE FONTSIZE

   syntax : {fontsize=XXX}
   with : XXX any positive integer number or 'normal'

3. 	CHANGE FONT STYLE

   syntax : {fontstyle=XXX}
   with : XXX equal to 'normal' (don't put quotes) or any combination of the characters
		 I (italic), U (underline), S (strikeout) and B (bold)
   example : {fontstyle=bi}  = bold + italic
   remark : not all font types support all 4 styles

4. 	CHANGE FONT TYPE

   syntax : {fontname=XXX}
   with : XXX the name of a font (like ARIAL), or 'normal'

5. 	CHANGE LINE HEIGHT (only has effect on the next line)

   syntax : {lineheight=XXX}
   with : XXX a positive integer number

6. 	ALIGN

   syntax : {tab}

7. 	DON'T TAKE A NEW LINE
	This command is handy to include a line with only commands in it. Start
	such a line with {nonewline}

   syntax : {nonewline}


9. 	DRAW A HORIZONTAL LINE WITH THE SAME WIDTH OF THE LAYOUTBOX 

   syntax : {drawline}

10. 	DRAW A BOX

   syntax : {startbox}
		...
            {stopbox}
   remark : all	TEXTlines between startbox and stopbox appear in a box.
	    These commands should be placed on a single, separate line.

11. 	INCLUDE LINK

	- You don't really need this, do you ?

12. 	INCLUDE SOUND

	- You don't really need this, do you ?

13. 	INCLUDE HIDDEN TEXT

	- You don't really need this, do you ?

14. 	INSERT PICTURE

    syntax : {picture=XXX}
    with : XXX the name of the .bmp file (without path or extention)
           The picture -if found in the directory specified by you in the
	   FullBMPPahtPrompt event - displays in actual size. 

15. 	INSERT TABLE

    syntax : {starttable=X|YYY}     (to start table)
		...
             {stoptable}       (to stop table)
    with :  X : number of columns
           YYY : kind of tabel : 'fixedrow', 'fixedcolumn','nofixed' or something else.
                             something else means fixed row and fixed column
    opm : alle regels tussen starttable en stoptable bevatten de aanduidingen
          van de cellen. Een regel stelt een rij voor, en de verschillende kolommen
          worden gescheiden d.m.v. het '|' teken. De aanduidingen starttable en stoptable
          dienen als eerste woord op een afzonderlijke regel te staan.
    remark : all lines between starttable and stoptable contain the cells. A line is
	  a row, and different columns within a row are divided by the '|' sign. The
	  commands 'starttable' and 'stoptable' should be placed as the first word on
	  a separate line. You might need to increase the stack size of your program
	  when using tables in the LayoutBox.
    example :
	{starttable=3|nofixed}
      	word1 | word2 | word3
        mslfjkmei |  lkjfmlie eqlf | ded
        ...
	{stoptable}


SOME PROPERTIES AND EVENTS
--------------------------

With the event 'OnWordClick', you can specify what to do when a word is clicked on.

    procedure (Sender : TObject; Button : TMouseButton; Shift : TShiftState;
                               X,Y : integer; TheWord : String );

With the event 'OnFullBMPPahtPrompt', you can expand the 8-character filename in the
source text with a pathname and an extention (must be .bmp);

    procedure (Sender : TObject; var FileName : string);

Use the method 'DisplayContents' to display the text in the contents-property.

        procedure DisplayContents;

Use the method 'ClearContents' to clear the display.

        procedure ClearContents;

Use the method GetSelWords to get a list of all selected (highlighted) words.

        procedure GetSelWords(var AList : TStrings);

Use the method UnSelectAll to unselect all words.

	procedure UnSelectAll;

Use the method SelectWord to select the first or all copies of a word.

        procedure SelectWord(AWord : string; SelectAll : Boolean);

The properties LeftMargin, TopMargin, LineHeight, should be clear enough.
The property SelColor defines the background color of a selected word.
The property NonSelColor defines the background color of a non-selected word.
The property SelectEnable determines wether words will highlight when clicked upon.
The property ClickEnable determines wether the 'click' event is invoked when a
word is clicked on.


RESPONSABILITY
--------------

I assume no responsability whatsoever.
Commands, suggestions and other stuff welcome.

